#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(jinyong, 0.0.1)
AM_INIT_AUTOMAKE(jinyong, 0.0.1)
AC_CONFIG_SRCDIR([src/cmd.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Check for SDL_library
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))

# Check for SDL_mixer library
AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio, , AC_MSG_ERROR([*** libSDL_mixer not found!]))

# Check for SDL_ttf library
AC_CHECK_LIB(SDL_ttf, TTF_Init, , AC_MSG_ERROR([*** libSDL_ttf not found!]))

# Check for SDL_gfx library
AC_CHECK_LIB(SDL_gfx, zoomSurface, , AC_MSG_ERROR([*** libSDL_gfx not found!])) 

# Checks for header files.
#AC_CHECK_HEADERS([limits.h])

# Checks for typedefs, structures, and compiler characteristics.
#AC_HEADER_STDBOOL
#AC_C_CONST
#AC_TYPE_SIZE_T

# Checks for library functions.
#AC_FUNC_MALLOC
#AC_HEADER_STDC
#AC_CHECK_FUNCS([memset])

AC_CONFIG_FILES([Makefile
				 src/Makefile
				 font/Makefile
				 game/Makefile])
AC_OUTPUT
